<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            /* 平滑滚动 */
            scroll-behavior: smooth; 
        }
        body{
            height: 3000px;
        }
        a{
            text-decoration: none;
            color: #000;
        }
        .top{
            /* width: 80px; */
            height: 50px;
            font-size: 14px;
            background-color: #ddd;
            line-height: 50px;
            position: fixed;
            padding: 0 20px;

            right: 10px;
            bottom: 100px;

            cursor: pointer;

        }
    </style>
</head>
<body>
    <a class="top" href="#top">
        返回顶部
    </a>
</body>
</html>